1. Field of the Invention
The present invention relates generally to the detection of dual tone multi-frequency (DTMF) coded signals, and more particularly, to detecting DTMF coded signals with improved frequency selectivity.
2. Description of the Related Art
DTMF is the signaling standard for the Touch Tone system. Two tones are combined to define a DTMF digit. Table 1 shows the matrix of frequencies used to encode the 16 DTMF symbols on a typical 4xc3x974 matrix telephone keypad. Each DTMF tone consists of two sine waves. One sine wave is from the low-frequency band (row frequency), and the other frequency is from the high-frequency band (column frequency).
Various methods have been used for DTMF generation and detection. Previously, analog circuitry had been used to generate and decode DTMF digits. More recently, the functions have been implemented using digital signal processors (DSP) to improve the accuracy, precision, stability, reprogrammability, and cast. A popular DSP algorithm for DTMF detection is the Goertzel algorithm. One such previous method is described in U.S. Pat. No. 5,644,634, issued to Zheng-yi Xie et al., entitled xe2x80x9cSystem and Method for Dual Tone Multifrequency Detection Using Variable Frame Widths,xe2x80x9d the specification of which is hereby incorporated by reference in its entirety.
In general, a DTMF detector examines the line or communication channel for the presence of two sinusoids using dedicated frequency domain algorithms, including modified Goertzel algorithms, DFT/FFTs, auto-correlation, zero crossing counting, and narrow band filter-based methods, among others.
A common technique for determining energy values in the frequency domain is performed by transforming the time domain sampling data to frequency domain data using a variant of the discrete Fourier transform (DFT) called the Goertzel algorithm. The transfer function for the Goertzel algorithm is:                                           H            k                    =                                    1              -                              ⅇ                                                                            -                      j                                        ⁢                                          xe2x80x83                                        ⁢                    2                    ⁢                                          xe2x80x83                                        ⁢                    π                                    ,                                      k                    N                                                                                      1              -                              c                ·                                  z                                      -                    1                                                              +                              z                                  -                  2                                                                    ,                            (        1        )            
where c is the Goertzel coefficient,   c  =      2    ⁢          xe2x80x83        ⁢          cos      ⁡              (                  2          ⁢                      xe2x80x83                    ⁢          π          ⁢                      xe2x80x83                    ⁢                      k            N                          )            
and N is the number of samples in a frame. The value of k is defined by:                               k          =                                    N                              F                s                                      ·                          F              tone                                      ,                            (        2        )            
where Fs is the sampling frequency (i.e., 8 kHz in typical telephone systems), Ftone is the frequency nearest the DTMF frequency that keeps the value of k to an integer. The energy of each DTMF frequency is calculated by the feed forward and feedback phase. The energy of each DTMF frequency point, k, is calculated by the feed forward and feedback phase. The feedback phase is calculated as:
Qk(n)=c.Qk(nxe2x88x921)xe2x88x92Qk(nxe2x88x922)+x(n),xe2x80x83xe2x80x83(3)
where Qk(xe2x88x921)=Qk(xe2x88x922)=0, n=0, 1, 2, . . . , Nxe2x88x921. Qk(nxe2x88x921) and Qk(nxe2x88x922) are feedback storage elements for a frequency point, and x(n) is the current input sample value.
The energy in each DTMF frequency bin, k, is calculated in the feedforward phase (i.e., n=N) by the equation:
E(dtmf)=|Yk(N)|2=Qk2(Nxe2x88x921)+Qk2(Nxe2x88x922)xe2x88x92Qk(Nxe2x88x921).Qk(Nxe2x88x922).c.xe2x80x83xe2x80x83(4)
After the energy of each DTMF frequency is calculated, the largest magnitude in each frequency band is compared to a threshold. If the energy in one of the bins exceeds the threshold, a DTMF tone may be present.
The Goertzel algorithm has difficulties meeting the required DTMF frequency distortion test. According to the industry standards, DTMF signals within a certain percentage of frequency distortion must be detected as valid DTMF tones. The DTMF signals must be rejected if the distortion exceeds certain larger percentages. FDTMF is defined as a standard DTMF frequency, and F is the actual frequency of the received signal. Based on the ATandT standard, if the F is within xc2x11.5% of FDTMF, it is a valid tone. If F is not within xc2x13.5% of FDTMF, it is not a valid tone.
Since the Goertzel algorithm finds energy aligned at the frequency of the N-point DFT, the corresponding frequency point, Ftone, is not exactly aligned with the desired DTMF frequency, because N and k are integers. As a result, the energy is distributed among neighboring frequency bins, referred to as leakage. Leakage degrades the accuracy of the frequency domain outputs.
Suppose the calculated frequency is 2.0% larger than the desired DTMF frequency. A xe2x88x922.0% error in the input signal moves the frequency to be exactly on the bin, and a +2.0% error moves the frequency further away from the bin and generates a very small output. The asymmetric effect complicates the selection of a frequency distortion threshold. Significant computational resources are required to determine if an energy value is at the left or right side of a frequency bin. Accordingly, setting different thresholds for left and right side distortion is not practical. Changing the window size, N, for the DTMF detection minimizes the asymmetric effect. However, no window size can completely eliminate the asymmetric effect.
Industry standards suggest a frame size of 205 samples, or 25.625 ms. A detector should detect a tone of at least 40 ms, but no less than 20 ms. The tone should be preceded by at least 40 ms of non-DTMF signal. To accept a DTMF tone detection, the detector should detect the tone in two consecutive frames. Considering a tone length of 40 ms, using the standard sample size of 205 causes detection difficulties.
The received tone may not be well aligned with the frame boundary, resulting in the timing diagram shown in FIG. 1A. The timing for three consecutive frames 11, 12, and 13 is shown. Each frame represents 205 samples, and the length of a received signal 15 is 40 ms. The received signal 15 is misaligned with respect to the boundaries of the frames 11, 12, 13. The second frame 12 is a full energy frame, but the first and third frames 11, 13 are only partial energy frames. Depending on the degree of misalignment, the DTMF detector could fail to detect the tone in both of the partial energy frames 11, 13, and the two consecutive frame hit requirement would not be met. Accordingly, the tone would be missed.
Previous methods to accommodate for frame misalignment have employed special processing techniques to align the received signal 15 with the frame boundary, as shown in FIG. 1B. Even with frame alignment, the third frame 13 is still a partial energy frame. As a result, the energy response shape for the third frame 13 will differ from that of the second frame 12. FIG. 1C illustrates a full frame frequency response 16 and a partial frame frequency response 17. The energy variation between the full and partial energy responses 16, 17 may result in the evaluation results not being consistent across the frames 12, 13, thus reducing the detection accuracy. The frame alignment method helps to improve the accuracy of the detector, but results in a more complicated and costly implementation.
The present invention is directed to overcoming, or at least reducing the effects of, one or more of the problems set forth above.
In one aspect of the present invention, a signal detector is provided for detecting at least a first signal having a first frequency and a first minimum duration. The signal detector includes a matched transform unit and an energy level detection unit. The matched transform unit is adapted to receive at least a first frame of time domain input samples at a sampling frequency and generate at least a first frequency energy value for the first frame based on at least a first subset of the time domain input samples. The first subset of the first frame has a width of less than about one half of the first minimum duration. The energy level threshold unit is adapted to compare the first frequency energy value to a threshold energy value to determine the presence of the first signal.
In another aspect of the invention, a method is provided for detecting at least a first signal having a first frequency and a first minimum duration. The method includes receiving at least a first frame of time domain input samples at a sampling frequency. At least a first frequency energy value is generated for the first frame based on at least a first subset of the time domain input samples. The first subset of the first frame has a width of less than about one half of the first minimum duration. The first frequency energy value is compared to a threshold energy value to determine the presence of the first signal.